public class Test2 {
    public static void main(String[] args) {
        System.out.println("Welcome to Java");
        System.out.println("Welcome to Java");
        System.out.println("Welcome to Java");
        System.out.println("Welcome to Java");
        System.out.println("Welcome to Java");
        // 循环5次
        for (int i = 0; i < 5; i++) {
            System.out.println("Welcome to Java");
        }
        // while循环五次
        int i = 0;
        while (i < 5) {
            System.out.println("Welcome to Java");
            ++i;
        }
        System.out.println();
        // do-while循环完成五次控制台输出
        i = 0;
        do {
            System.out.println("Welcome to Java");
            ++i;
        } while (i < 5);
    }
}
